@page
@{ Layout = "_Layout"; }

@section Styles{
    <link href="/sitefiles/assets/lib/geeks/css/bootstrap-icons.css" rel="stylesheet" />
    <link href="/sitefiles/assets/lib/geeks/css/theme.min.css" rel="stylesheet" type="text/css" />
}

<el-card>
    <el-row :gutter="18">
        <el-col :span="8">
            <div class="pt-3"></div>
            <el-timeline>
                <el-timeline-item timestamp="数据操作日志" placement="bottom" type="warning" size="large" icon="el-icon-info">
                    <h4>动态</h4>
                    <span slot="dot"><i class="el-icon-info fs-4"></i></span>
                </el-timeline-item>
            </el-timeline>
            <div>
                <el-scrollbar class="scrollbar" :style="{ height: ($(window).height()-145) + 'px' }">
                    <div class="pe-3" v-if="total>0">
                        <el-timeline>
                            <el-timeline-item :timestamp="log.date" :type="log.color" placement="top" v-for="log in list">
                                <div class="my-3 fs-6">
                                    <span>
                                        <el-link class="fs-6 pb-1" size="mini" v-on:click="utils.openAdminView(log.adminId)"><i class="el-icon-user-solid me-1"></i>{{ log.adminName }}</el-link>
                                        <span :class="'text-'+log.color">{{ log.title }}</span><span v-if="log.name.length>0">（{{ log.name }}）</span>
                                    </span>
                                </div>
                                <div v-if="log.statType==='Export'">
                                    <el-link class="fs-6" size="mini" icon="el-icon-download" v-on:click="window.open(log.url)">重新下载</el-link>
                                </div>
                                <div v-else>
                                    <div v-if="log.isAdmin || log.isUser || log.isTm || log.isDeleteTm || log.isExam || log.isExamQ || log.isExamAss || log.isExamPk || log.isExamCer || log.isKnowledge">
                                        <el-link class="fs-6" icon="el-icon-view" size="mini" v-on:click="btnViewClick(log)" v-if="log.isView">预览</el-link>
                                        <el-link class="fs-6" icon="el-icon-edit" size="mini" v-on:click="btnEditClick(log)" v-if="log.isEdit">编辑</el-link>
                                    </div>
                                </div>
                            </el-timeline-item>
                        </el-timeline>
                        <div class="py-5 text-center">
                            <el-link :size="euiSize" type="primary" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-link>
                            <small v-else>没有更多了</small>
                        </div>
                    </div>
                    <div v-else>
                        <el-timeline>
                            <el-timeline-item timestamp="暂无动态" placement="bottom">
                            </el-timeline-item>
                        </el-timeline>
                    </div>
                </el-scrollbar>
            </div>
        </el-col>
        <el-col :span="16">
            <el-card class="box-card">
                <h4><i class="el-icon-s-data me-2"></i>数据简报</h4>
                <apexchart type="bar" :options="chartOptions" :series="series" :height="($(window).height()-150)"></apexchart>
            </el-card>
        </el-col>
    </el-row>
</el-card>

@section Scripts{
    <script src="/sitefiles/assets/lib/apexcharts/apexcharts.js" type="text/javascript"></script>
    <script src="/sitefiles/assets/lib/apexcharts/vue-apexcharts.js" type="text/javascript"></script>
    <script src="/sitefiles/assets/js/admin/dashboardAdmin.js" type="text/javascript"></script>
}